<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main"/>
        <g:javascript src="app/grupo.js" />
    </head>
    <body>
      <h1>Alterar Grupo</h1><hr/>
          <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
          </g:if>
          <g:hasErrors bean="${grupo}">
            <div class="errors">
                <g:renderErrors bean="${grupo}" as="list" />
            </div>
          </g:hasErrors>
          <div id="validateErrors"class="errors" style="display:none;">
            <ul></ul>
          </div>
        <br/>
          <g:form name="formGrupo" controller="grupo" method="post" >
              <input type="hidden" name="id" value="${grupo?.id}" />
            <table width="100%" border="0" cellspacing="5" cellpadding="0" align="center" class="textoverdana">
            <tr>
              <td>Descri&ccedil;&atilde;o: *<br/>
                  <input type="text" 
                         size="35" 
                         id="descricao" 
                         name="descricao" 
                         value="${fieldValue(bean:grupo,field:'descricao')}"
                         class="text ui-widget-content ui-corner-all"/>
              </td>
                <td>&nbsp;</td>
            </tr>

            <tr>
                <td>Aplica&ccedil;&otilde;es dispon&iacute;veis:</td>
                <td></td>
                <td>Aplica&ccedil;&otilde;es do grupo:</td>
            </tr>
            <tr>
              <td>
                <g:select id="lista1" multiple="multiple" size="10" from='${aplicacoes}' optionKey="id" optionValue="${{it.menu.descricao+' - '+it.descricao}}" style="width:100%"></g:select>
              </td>
              <td style="text-align:center">
                <input name="moveRight" id="moveRight" type="button" class="botao" value="&gt;&gt;" onClick="move('lista1','lista2');"/> <br/> <br/>
                <input name="moveLeft" id="moveLeft" type="button" class="botao" value="&lt;&lt;"  onClick="move('lista2','lista1');"/>
              </td>
              <td>
                <g:select id="lista2" name="lista2" multiple="multiple" size="10" from='${grupo_apli}' optionKey="id" optionValue="${{it.menu.descricao+' - '+it.descricao}}" style="width:100%"></g:select>
              </td>
                <td>&nbsp;</td>
            </tr>
          </table>
          <p align="center">
              <g:actionSubmit id="atualizar" class="botao" action="update" value="Atualizar" onClick="seleciona('lista2');return validar();"/>
              <g:actionSubmit id="deletar" class="botao" action="delete" value="Apagar" onclick="return confirm('Deseja realmente apagar?');"/>
              <g:link action="list"><input class="botao" id="voltar" type="button" value="Voltar" /></g:link>
          </p>
          <p align="left"><em>*Campos Obrigat&oacute;rios</em></p>
          </g:form>
    </body>
</html>

